package com.sfx.controller;

import com.sfx.model.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Controller;


@Configuration
public class UserBeans {
    @Bean(name = "user_1")
    public User user1(){
        User user = new User();
        user.setId(21);
        user.setAge(19);
        user.setName("UserBeans-->张三");
        return user;
    }

    @Bean(name = "user_2")
    public User user2(){
        User user = new User();
        user.setId(21);
        user.setAge(19);
        user.setName("UserBeans-->张三");
        return user;
    }
}